package com.springboot_blog.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 状态枚举类
 */
public class StatusEnum {

    /**
     * 通用状态枚举
     */
    @Getter
    @AllArgsConstructor
    public enum Common {
        DISABLED(0, "禁用"),
        ENABLED(1, "启用");

        private final Integer code;
        private final String desc;
    }

    /**
     * 文章状态枚举
     */
    @Getter
    @AllArgsConstructor
    public enum Post {
        DRAFT("DRAFT", "草稿"),
        PUBLISHED("PUBLISHED", "已发布"),
        ARCHIVED("ARCHIVED", "已归档");

        private final String code;
        private final String desc;
    }

    /**
     * 评论状态枚举
     */
    @Getter
    @AllArgsConstructor
    public enum Comment {
        PENDING("PENDING", "待审核"),
        APPROVED("APPROVED", "已通过"),
        REJECTED("REJECTED", "已拒绝");

        private final String code;
        private final String desc;
    }

    /**
     * 配置类型枚举
     */
    @Getter
    @AllArgsConstructor
    public enum ConfigType {
        STRING("STRING", "字符串"),
        NUMBER("NUMBER", "数字"),
        BOOLEAN("BOOLEAN", "布尔值"),
        JSON("JSON", "JSON对象");

        private final String code;
        private final String desc;
    }

    /**
     * 角色编码枚举
     */
    @Getter
    @AllArgsConstructor
    public enum Role {
        SUPER_ADMIN("SUPER_ADMIN", "超级管理员"),
        ADMIN("ADMIN", "管理员"),
        USER("USER", "普通用户");

        private final String code;
        private final String desc;
    }
}
